package com.rinlink.jbcodec.creator;

import com.alibaba.fastjson.JSONObject;
import com.rinlink.jbcodec.common.CreatorUtils;
import com.rinlink.jbcodec.transform.BytesToBooleanList;
import com.rinlink.jbcodec.transform.Transform;

import java.nio.ByteBuffer;

public class ByteBufferToBooleanListCreator extends ByteBufferToObjectCreator {

    @Override
    protected Transform create(JSONObject attr, ByteBuffer data, JSONObject t) {
        return new BytesToBooleanList(data, CreatorUtils.getListSize(attr,t));
    }
}
